Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add auto upgrade mapping logic #699

Merged

Conversation

zhichao-aws
Copy link
Member

@zhichao-aws zhichao-aws commented Jul 3, 2023

Description

add field schema_version to notification index mapping, and autoupgrade logic

Issues Resolved

#677

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

@codecov
Copy link

codecov bot commented Jul 3, 2023

Codecov Report

Merging #699 (db21335) into main (58a7578) will increase coverage by 0.08%.
Report is 1 commits behind head on main.
The diff coverage is 70.83%.

@@             Coverage Diff              @@
##               main     #699      +/-   ##
============================================
+ Coverage     66.19%   66.27%   +0.08%     
- Complexity      253      257       +4     
============================================
  Files            39       39              
  Lines          1698     1720      +22     
  Branches        158      165       +7     
============================================
+ Hits           1124     1140      +16     
- Misses          456      457       +1     
- Partials        118      123       +5     
Flag Coverage Δ
opensearch-notifications 66.27% <70.83%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
...rch/notifications/index/NotificationConfigIndex.kt 70.45% <70.83%> (+0.32%) ⬆️

Signed-off-by: zhichao-aws <[email protected]>
Signed-off-by: zhichao-aws <[email protected]>
@zhichao-aws zhichao-aws marked this pull request as ready for review July 3, 2023 11:10
@zhichao-aws zhichao-aws marked this pull request as draft July 5, 2023 07:47
@zhichao-aws zhichao-aws marked this pull request as ready for review August 7, 2023 04:00
@zhichao-aws zhichao-aws merged commit 5670c35 into opensearch-project:main Aug 8, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 8, 2023
* add auto upgrade mapping logic

Signed-off-by: zhichao-aws <[email protected]>

* put load mapping to initialize step

Signed-off-by: zhichao-aws <[email protected]>

* add schema_version field

Signed-off-by: zhichao-aws <[email protected]>

* add integ test

Signed-off-by: zhichao-aws <[email protected]>

* add integ test for lacking _meta field

Signed-off-by: zhichao-aws <[email protected]>

---------

Signed-off-by: zhichao-aws <[email protected]>
(cherry picked from commit 5670c35)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@opensearch-trigger-bot
Copy link
Contributor

The backport to 2.x failed:

Server Error

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/notifications/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/notifications/backport-2.x
# Create a new branch
git switch --create backport/backport-699-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 5670c358679b609f40a32d2419f56e508d98885a
# Push it to GitHub
git push --set-upstream origin backport/backport-699-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/notifications/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-699-to-2.x.

zhichao-aws pushed a commit that referenced this pull request Aug 8, 2023
* add auto upgrade mapping logic



* put load mapping to initialize step



* add schema_version field



* add integ test



* add integ test for lacking _meta field



---------


(cherry picked from commit 5670c35)

Signed-off-by: zhichao-aws <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants